Maps in Odin
The map data structure in Odin.
Maps can be created via make() procedure and can be deleted via delete(). The syntax is map[key_type]value_type.
m := make(map[string]int)
defer delete(m)
m["Bob"] = 2
fmt.println(m["Bob"]) // 2
To give a map initial values, wrap key = value pairs with { ... }.
m := map[string]int {
"Bob" = 2,
"Alex" = 1,
}